package com.yuandian.management.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuandian.api.management.entity.ConfProbeInterface;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.management.service.ConfProbeInterfaceService;
import com.yuandian.management.utils.JacksonUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 探针接口配置-Controller
 * @author zfsn
 * @date 2023-5-10
 */
@Slf4j
@Api(tags = "探针采集管理-查看探针接口")
@RestController
@RequestMapping("/probeInterface")
public class ConfProbeInterfaceController {

	@Autowired
	private ConfProbeInterfaceService confProbeInterfaceService;

	/**
	 * 探针接口列表
	 * @param confProbeInterface
	 * @return
	 */
	@PostMapping("/interfaceList")
	@ApiOperation(value = "查看探针接口", notes = "查看探针接口")
	public R<Page<ConfProbeInterface>> queryProbeInterface(@RequestBody ConfProbeInterface confProbeInterface) {
		log.info("[探针采集配置管理][探针接口列表] {}", JacksonUtil.objectToString(confProbeInterface));
		return R.ok(confProbeInterfaceService.queryProbeInterface(confProbeInterface));
	}

}
